<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <link rel="stylesheet" href="/css/index.css">

    <title>Document</title>
</head>
<body>
<div class="container">
    <nav class="navbar navbar-expand-lg navbar-dark bg-dark">
        <a class="navbar-brand" href="#">首页</a>
        <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
            <span class="navbar-toggler-icon"></span>
        </button>

        <div class="collapse navbar-collapse" id="navbarSupportedContent">
            <ul class="navbar-nav mr-auto">
                <li class="nav-item">
                    <a class="nav-link disabled" href="{{route('user.index')}}">用户管理</a>
                </li>
            </ul>

           @if(Auth::check())
                <a href="{{route('password')}}" class="btn btn-outline-danger my-2 my-sm-0 mr-2" >{{Auth::user()->username}}</a>
                <a href="{{route('loginOut')}}" class="btn btn-outline-success my-2 my-sm-0" >退出登录</a>

            @else
                <a href="{{route('login')}}" class="btn btn-outline-danger my-2 my-sm-0 mr-2" >登录 </a>
                <a href="{{route('register')}}" class="btn btn-outline-success my-2 my-sm-0" >注册</a>
            @endif
        </div>
    </nav>
    @include('layouts._message')
    @yield('content')
</div>
</body>
</html>
